The present invention relates generally to data processing systems, methods and computer program products and, more particularly, to data processing systems, methods and computer program products for improving the performance of servers and server applications.
The paradigm for the Internet is that of a client-server relationship where clients communicate with servers. To provide greater access to the Internet, the communication protocols and languages utilized by clients and servers have become standardized. These protocols include the Hyper-Text Transfer Protocol (HTTP), which is the communication protocol used for communications between clients and servers, and the Transmission Control Protocol/Internet Protocol (TCP/IP), the TCP portion of which is the transport specific protocol for communication between computers or applications. Also standardized is the language in which clients and servers communicate which is called Hyper-Text Markup Language (HTML).
In the context of the World Wide Web (Web) client/server applications, a client may be a Web browser which acts as a user interface. A Web browser sends user requests to an appropriate Web server and formats and displays the HTML data returned from the Web server. A Web browser also evaluates the HTML data to determine if there are any embedded hyper-link statements in the HTML data which would require subsequent browser requests which would then be initiated by the browser. A Web server acts as the server for the client and processes the Web browsers requests and returns the requested response as an HTML data portion of a HTTP data stream.
A Web server typically has an HTTP daemon that forwards client requests to various server applications for processing, as appropriate. These server applications may be either local or remote to the Web server. When a client request for server application processing is received by a Web server, the HTTP daemon for the Web server dispatches a request to the appropriate server application. The HTTP daemon listens for a reply from the server application and then sends the reply from the server application to the requesting client via the Web server.
A Web server serves as an intermediary between a requesting client and a server application. A Web server is conventionally designed to have a finite number of server threads that process Web client requests. For a particular server application request, a server thread typically passes the request to the appropriate server application via an HTTP daemon and then waits for the server application to finish processing before returning to service a new client request. Accordingly, a Web server thread and socket associated with a client request remain xe2x80x9cin-usexe2x80x9d while a server application is processing a client request.
Unfortunately, the number of concurrent client connections a Web server can handle may be reduced as the number of xe2x80x9cin-usexe2x80x9d threads and sockets increase. Accordingly, a Web server""s throughput and scalability may be reduced as server application requests from clients increase. In addition, server application requests may take longer to process than static Web client requests. Thus, the throughput of a Web server may be reduced further as the number of server application requests are increased. For example, a Web server may normally be able to handle 600 static Web client requests per second. However, the same Web server may only be able to handle 100 server application requests per second.
Because a Web server serves as an intermediary between a Web client and server application, server application response may be delayed in reaching a client. Furthermore, because a server application response travels through a Web server, the performance time of a server application may be negatively affected.
In view of the above discussion, it is an object of the present invention to allow Web servers to process server application requests from clients without reducing Web server throughput and scalability.
It is another object of the present invention to decrease response time between when a client makes a request to a server application and when the server application responds to the client with processing results.
These and other objects of the present invention are provided by systems, methods and computer program products for handling client requests for server application processing wherein a client request and a connection between the client and server is transferred to a server application queue via a server thread. The server thread is then returned to the server, thereby leaving an open connection with the requesting client. The open client connection is then retrieved and maintained by a server application, such as a servlet. Upon receiving the transferred client request, the servlet processes the client request and then sends processing results directly to the client via the retrieved connection.
Servers incorporating connection passing according to the present invention may be transparent to a client user. Furthermore, servers incorporating connection passing according to the present invention may be advantageous because a server thread can quickly return to a server""s thread pool for receiving new client requests. Accordingly, a server""s throughput and scalability may not be negatively affected even though the server receives an increase in server application requests. In addition, because a server may not be required to serve as an intermediary between a client and a server application, faster communication between the server application and a client may result.